home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / misc / notes / deutsch / bassschlüssel.rexx < prev    next >
OS/2 REXX Batch file  |  1999-04-19  |  46KB  |  1,508 lines

  1. /* Unterprogramm zu Noten.pprx */
  2.  
  3. signal on halt
  4. signal on break_c
  5. signal on break_e
  6. signal on break_d
  7. call ppm_SetStyle(N)
  8. call ppm_SetMagMode(250)
  9. call ppm_UpdateScreen()
  10.  
  11. noteneingabe:
  12.     sysform = "Notensystemart:2"'0a'x"Anzahl Vorzeichen:2"'0a'x"kleinster Notenwert:4"
  13.     systemform = ppm_Getform("Bitte eingeben ... (nichts=ABBRUCH)", 3, sysform)
  14.     if systemform = '' then exit_msg("Abbruch!")
  15.     parse var systemform systemart '0a'x vz '0a'x xgrd
  16.  
  17.     select
  18.     when systemart == '2' then zdist = 4
  19.     when systemart == '1v' then zdist = 2
  20.     when systemart == '1b' then zdist = 2
  21.     when systemart == '' then exit_msg("Abbruch!")
  22.     when vz == '' then exit_msg("Abbruch!")
  23.     otherwise noteneingabe()
  24.     end
  25.     zdist2 = zdist-2
  26.     if xgrd == '' then  exit_msg("Abbruch")
  27.     select
  28.      when xgrd == '1' then xg =0.7
  29.      when xgrd == '2' then xg =1.4
  30.      when xgrd == '4' then xg =2.8
  31.      when xgrd == '8' then xg =5.6
  32.      when xgrd == '16' then xg =11.2
  33.      when xgrd == '' then exit_msg("Abbruch!")
  34.      otherwise noteneingabe()
  35.     end
  36.  
  37.    /* Punktgröße der Noten */
  38.    notepkt = 26
  39.    call ppm_SetJustification(0)
  40.  
  41.    secondbox=ppm_BoxNum()
  42.  
  43.    zz = 0 /* Zeilenzähler */
  44.    notex = 0
  45.    notey = 0
  46.    page = ppm_CurrentPage()
  47.  
  48. clickpos:
  49.    res = ppm_GetUserText(2, "Manuell oder an Box ausrichten ? m/b")
  50.    if res == 'M' then res = 'm'
  51.    if res == 'B' then res = 'b'
  52.  select
  53.    when res == 'm' then
  54.      do
  55.        clickpos = ppm_GetClickPosition("Bitte die Stelle anklicken wo ich beginnen soll...")
  56.        if clickpos == 0 then
  57.            do
  58.            exit_msg("Falsche Eingabe !! ENDE !!")
  59.            end
  60.        else
  61.            do
  62.            notey = word(clickpos, 2)
  63.            notex = word(clickpos, 1)
  64.            if notex < (2+(vz*0.175)) then notex = (2+(vz*0.175))
  65.            xw = notex
  66.            yw = notey
  67.            if systemart ~= '2' then
  68.             do
  69.              if notey <= 3.3  then zz= 0   /* zz ist ZeilenZähler */
  70.              if ((notey > 3.5)&(notey < 5.3)) then zz = 2
  71.              if ((notey > 5.5)&(notey < 7.3)) then zz = 4
  72.              if ((notey > 7.5)&(notey < 9.3)) then zz = 6
  73.              if ((notey > 9.5)&(notey < 11.3)) then zz = 8
  74.              if ((notey > 11.5)&(notey < 13.3)) then zz = 10
  75.              if ((notey > 13.5)&(notey < 15.3)) then zz = 12
  76.              if ((notey > 15.5)&(notey < 17.3)) then zz = 14
  77.              if ((notey > 17.5)&(notey < 19.3)) then zz = 16
  78.              if ((notey > 19.5)&(notey < 21.3)) then zz = 18
  79.              if ((notey > 21.5)&(notey < 23.3)) then zz = 20
  80.              if ((notey > 23.5)&(notey < 25.3)) then zz = 22
  81.              if notey > 25.3 then noteneingabe()
  82.             end
  83.            else
  84.             do
  85.              if notey <= 5.3  then zz= 0   /* zz ist ZeilenZähler */
  86.              if ((notey > 5.4)&(notey < 9.3)) then zz = 4
  87.              if ((notey > 9.4)&(notey < 13.3)) then zz = 8
  88.              if ((notey > 13.4)&(notey < 17.3)) then zz = 12
  89.              if ((notey > 17.4)&(notey < 21.3)) then zz = 16
  90.              if ((notey > 21.4)&(notey < 25.3)) then zz = 20
  91.              if notey > 25.3 then noteneingabe()
  92.             end
  93.            end
  94.      end
  95.    when res == 'b' then
  96.       do
  97.         clickbox = ppm_ClickOnBox("Bitte eine Box anklicken, an der Stelle, wo es weitergeht ...")
  98.         pos = ppm_GetBoxPosition(clickbox)
  99.         notex = word(pos, 1)
  100.         notey = word(pos, 2)
  101.         xw = notex
  102.         if notex <= 1 then noteneingabe()
  103.         yw = notey
  104.         secondbox = ppm_BoxAtPosn(notex, notey, page)
  105.         if systemart ~= '2' then
  106.          do
  107.           if notey <= 3.3  then zz= 0   /* zz ist ZeilenZähler */
  108.           if ((notey > 3.5)&(notey < 5.3)) then zz = 2
  109.           if ((notey > 5.5)&(notey < 7.3)) then zz = 4
  110.           if ((notey > 7.5)&(notey < 9.3)) then zz = 6
  111.           if ((notey > 9.5)&(notey < 11.3)) then zz = 8
  112.           if ((notey > 11.5)&(notey < 13.3)) then zz = 10
  113.           if ((notey > 13.5)&(notey < 15.3)) then zz = 12
  114.           if ((notey > 15.5)&(notey < 17.3)) then zz = 14
  115.           if ((notey > 17.5)&(notey < 19.3)) then zz = 16
  116.           if ((notey > 19.5)&(notey < 21.3)) then zz = 18
  117.           if ((notey > 21.5)&(notey < 23.3)) then zz = 20
  118.           if ((notey > 23.5)&(notey < 25.3)) then zz = 22
  119.           if notey > 25.3 then noteneingabe()
  120.          end
  121.         else
  122.          do
  123.           if notey <= 5.3  then zz= 0   /* zz ist ZeilenZähler */
  124.           if ((notey > 5.4)&(notey < 9.3)) then zz = 4
  125.           if ((notey > 9.4)&(notey < 13.3)) then zz = 8
  126.           if ((notey > 13.4)&(notey < 17.3)) then zz = 12
  127.           if ((notey > 17.4)&(notey < 21.3)) then zz = 16
  128.           if ((notey > 21.4)&(notey < 25.3)) then zz = 20
  129.           if notey > 25.3 then noteneingabe()
  130.          end
  131.       end
  132.    otherwise clickpos()
  133.  end
  134.  
  135.    /* Zeigerbox */
  136.  
  137.    zbid = ppm_CreateBox(notex, zz+zdist2+0.5, 0.3, 1, 0)
  138.    call ppm_SetSize(26)
  139.    zbn = ppm_GetBoxName(zbid)
  140.    call ppm_TextIntoBox(zbn, '5')
  141.  
  142. notenwert:
  143.  
  144.    do forever
  145.            cr = '0a'x
  146.            form = "Wert Name ['A'ufl.]"
  147.            call ppm_SetBoxPosition(zbid, notex, zz+zdist2+0.5)
  148.            call ppm_UpdateScreen()
  149.            eingabe = ppm_GetForm("Bitte für die Noten eingeben ...(nichts=Abbruch)", 9, form)
  150.            if eingabe == '' then
  151.            do
  152.             call ppm_DeleteBox(zbid)
  153.             exit_msg()
  154.            end
  155.            nw = word(eingabe, 1)
  156.            if nw == 'P' then nw = 'p'
  157.            nn = word(eingabe, 2)
  158.            al = word(eingabe, 3)
  159.            if al == 'A' then al = 'a'
  160.            IF nw == 'D' then nw = 'd'
  161.            if nw == 'LEFT' then nw = 'left'
  162.            if nw == 'L' then nw = 'l'
  163.            if nw == 'T' then nw = 't'
  164.            if nn == 'T' then nn = 't'
  165.            if nw == 'M' then nw = 'm'
  166.            if nw == "NEU" then nw = "neu"
  167.  
  168.  
  169.             select
  170.               when nn=='DB1' then nn = 'Db1'
  171.               when nn=='EB1' then nn = 'Eb1'
  172.               when nn=='GB1' then nn = 'Gb1'
  173.               when nn=='AB1' then nn = 'Ab1'
  174.               when nn=='DB2' then nn = 'Db2'
  175.               when nn=='EB2' then nn = 'Eb2'
  176.               when nn=='GB2' then nn = 'Gb2'
  177.               when nn=='AB2' then nn = 'Ab2'
  178.               when nn=='DB3' then nn = 'Db3'
  179.               when nn=='EB3' then nn = 'Eb3'
  180.               when nn=='GB3' then nn = 'Gb3'
  181.               otherwise NOP
  182.             end
  183.  
  184.     /* x-Abstände der Noten zueinander */
  185. auswahl:
  186.      select
  187.       when nw == 's' then
  188.           do
  189.           xw = xg/16
  190.           nw='x'
  191.           yv = 0
  192.           end
  193.       when nw  == 'S' then
  194.           do
  195.           xw = xg/16
  196.           nw='X'
  197.           yv = 0.47
  198.           end
  199.       when nw == 'a' then
  200.           do
  201.           xw = xg/8
  202.           nw='e'
  203.           yv = 0
  204.           end
  205.       when nw == 'A' then
  206.           do
  207.           xw = xg/8
  208.           nw='E'
  209.           yv = 0.47
  210.           end
  211.       when nw == 'v' then
  212.           do
  213.           xw = xg/4
  214.           nw='q'
  215.           yv = 0
  216.           end
  217.       when nw == 'V' then
  218.           do
  219.           xw = xg/4
  220.           nw='Q'
  221.           yv = 0.47
  222.           end
  223.       when nw == 'h' then
  224.           do
  225.           xw = xg/2
  226.           yv = 0
  227.           end
  228.       when nw == 'H' then
  229.           do
  230.           xw = xg/2
  231.           yv = 0.47
  232.           end
  233.       when nw == 'g' then
  234.           do
  235.           xw = xg
  236.           nw='w'
  237.           yv = 0
  238.           end
  239.       when nw == 'G' then
  240.           do
  241.           xw = xg
  242.           nw='W'
  243.           yv = 0.47
  244.           end
  245.  
  246.      /* 2 Achtel- oder Sechzehntelnoten mit Balken verbinden */
  247.  
  248.       when nw=='m' then
  249.           do
  250.             call ppm_SetEdit(secondbox)
  251.             call ppm_SelectBoxText()
  252.             boxtxt=ppm_GetBlockText(0)
  253.             btb=word(boxtxt,1)
  254.             select
  255.                 when btb=='e' then
  256.                 do
  257.                   fbx=0.45
  258.                   fby=0.12
  259.                   newtxt='q'
  260.                   balk=1
  261.                 end
  262.                 when btb=='E' then
  263.                 do
  264.                   fbx=0.145
  265.                   fby=0.73
  266.                   newtxt='Q'
  267.                   balk=1
  268.                 end
  269.                 when btb=='x' then
  270.                 do
  271.                   fbx=0.45
  272.                   fby=0.12
  273.                   newtxt='q'
  274.                   balk=2
  275.                 end
  276.                 when btb=='X' then
  277.                 do
  278.                   fbx=0.145
  279.                   fby=0.73
  280.                   newtxt='Q'
  281.                   balk=2
  282.                 end
  283.                 otherwise
  284.                 do
  285.                     call ppm_EndEdit()
  286.                     call ppm_Inform(1,"Nur achtel und sechzehntel können verbunden werden!!!","OK")
  287.                     notenwert()
  288.                 end
  289.             end
  290.             call ppm_Cut()
  291.             call ppm_UnBlock()
  292.             call ppm_EndEdit()
  293.             call ppm_TextIntoBox(secondbox, newtxt)
  294.             boxposb=ppm_GetBoxPosition(secondbox)
  295.             boxbx=word(boxposb,1)
  296.             boxby=word(boxposb,2)
  297.             if boxbosbx <= 3 then
  298.             do
  299.                 call ppm_Inform(1,"Über das Zeilenende nicht zu verbinden ... :(","OK")
  300.                 notenwert()
  301.             end
  302.             do forever
  303.               info = ppm_GetBoxInfo(firstbox)
  304.               type = word(info,1)
  305.               if type ~= "Text" then firstbox = firstbox - 1
  306.               else break
  307.             end
  308.             curbox=ppm_ArtFirstBox(firstbox)
  309.             call ppm_SetEdit(curbox)
  310.             call ppm_SelectBoxText()
  311.             boxtxt=ppm_GetBlockText(0)
  312.             bta=word(boxtxt,1)
  313.             select
  314.                 when bta=='e' then
  315.                 do
  316.                   fax=0.39
  317.                   fay=0.12
  318.                   newtxt='q'
  319.                 end
  320.                 when bta=='E' then
  321.                 do
  322.                   fax=0.085
  323.                   fay=0.73
  324.                   newtxt='Q'
  325.                 end
  326.                 when bta=='x' then
  327.                 do
  328.                   fax=0.39
  329.                   fay=0.12
  330.                   newtxt='q'
  331.                 end
  332.                 when bta=='X' then
  333.                 do
  334.                   fax=0.085
  335.                   fay=0.73
  336.                   newtxt='Q'
  337.                 end
  338.                 otherwise
  339.                 do
  340.                     call ppm_EndEdit()
  341.                     call ppm_Inform(1,"Nur achtel und sechzehntel können verbunden werden!!!","OK")
  342.                     notenwert()
  343.                 end
  344.             end
  345.             if bta ~= btb then
  346.             do
  347.                 call ppm_EndEdit()
  348.                 call ppm_Inform(1,"Nur gleiche Noten können verbunden werden!!!","OK")
  349.                 call ppm_SetEdit(secondbox)
  350.                 call ppm_SelectBoxText()
  351.                 call ppm_Cut()
  352.                 call ppm_EndEdit()
  353.                 call ppm_TextIntoBox(secondbox, btb)
  354.                 notenwert()
  355.             end
  356.             call ppm_Cut()
  357.             call ppm_UnBlock()
  358.             call ppm_EndEdit()
  359.             call ppm_TextIntoBox(curbox, newtxt)
  360.             boxposa=ppm_GetBoxPosition(curbox)
  361.             boxax=word(boxposa,1)
  362.             boxay=word(boxposa,2)
  363.             call ppm_SetLineWeight(3)
  364.             do forever
  365.               if balk == 0 then break
  366.               lineid=ppm_DrawLine(boxax+fax, boxay+fay, boxbx+fbx, boxby+fby)
  367.               call ppm_SetBoxOffset(lineid, -0.08, 0)
  368.               measure=ppm_GetBoxSize(lineid)
  369.               linex = word(measure,1)
  370.               liney = word(measure,2)
  371.               call ppm_SetBoxSize(lineid, linex - 0.155, liney)
  372.               if bta == 'x' then
  373.               do
  374.                 fay = fay + 0.2
  375.                 fby = fby + 0.2
  376.               end
  377.               if bta == 'X' then
  378.               do
  379.                 fay = fay - 0.2
  380.                 fby = fby - 0.2
  381.               end
  382.               balk = balk - 1
  383.             end
  384.             call ppm_ArtFirstBox(secondbox)
  385.             call ppm_SetLineWeight(0.5)
  386.           end
  387.  
  388.      /* Sprung an den Anfang der Zeile */
  389.       when nw == 'left' then
  390.           do
  391.            call ppm_SetPagePosition(0, zz+zdist2+0.5)
  392.           end
  393.  
  394.      /* Punkt nach der Note - muß als erstes eingegeben werden falls gewünscht
  395.         den nötigen Freiraum mit "sp" eingeben */
  396.  
  397.       when nw == 'pk' then
  398.           do
  399.             if notex < 3 then
  400.             do
  401.               notex = bakx
  402.               zz = zz - zdist
  403.               call ppm_SetSize(25)
  404.               box#id = ppm_CreateBox(notex+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  405.               call ppm_SetSize(20)
  406.               call ppm_TextIntoBox(box#id, 'd')
  407.             end
  408.             else
  409.             do
  410.               call ppm_SetSize(25)
  411.               box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  412.               call ppm_SetSize(20)
  413.               call ppm_TextIntoBox(box#id, 'd')
  414.             end
  415.            select
  416.                when nn == '1' then
  417.                do
  418.                xw = xg
  419.                notex = notex+xw
  420.                end
  421.                when nn == '2' then
  422.                do
  423.                xw = xg/2
  424.                notex = notex+xw
  425.                end
  426.                when nn == '4' then
  427.                do
  428.                xw = xg/4
  429.                notex = notex+xw
  430.                end
  431.                when nn == '8' then
  432.                do
  433.                xw = xg/8
  434.                notex = notex+xw
  435.                end
  436.                when nn == '16' then
  437.                do
  438.                xw  = xg/16
  439.                notex = notex+xw
  440.                end
  441.                when nn == 't' then
  442.                do
  443.                xw  = 0.2
  444.                notex = notex+xw
  445.                end
  446.                otherwise notenwert()
  447.            end
  448.            if notex >=18.7 then
  449.                do
  450.                  notex = (2+(vz*0.175))
  451.                  zz = zz + zdist
  452.                end
  453.            px = notex - 4
  454.            py = zz-1
  455.            if px < 0 then px = 0
  456.            call ppm_SetPagePosition(px, py+1.5)
  457.            notenwert()
  458.  
  459.           end
  460.  
  461.       when nw == 'PK' then
  462.           do
  463.             if notex < 3 then
  464.             do
  465.               notex = bakx
  466.               zz = zz - zdist
  467.               call ppm_SetSize(25)
  468.               box#id = ppm_CreateBox(notex+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  469.               call ppm_SetSize(20)
  470.               call ppm_TextIntoBox(box#id, 'd')
  471.             end
  472.             else
  473.             do
  474.               call ppm_SetSize(25)
  475.               box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  476.               call ppm_SetSize(20)
  477.               call ppm_TextIntoBox(box#id, 'd')
  478.             end
  479.            select
  480.                when nn == '1' then
  481.                do
  482.                xw = xg
  483.                notex = notex+xw
  484.                end
  485.                when nn == '2' then
  486.                do
  487.                xw = xg/2
  488.                notex = notex+xw
  489.                end
  490.                when nn == '4' then
  491.                do
  492.                xw = xg/4
  493.                notex = notex+xw
  494.                end
  495.                when nn == '8' then
  496.                do
  497.                xw = xg/8
  498.                notex = notex+xw
  499.                end
  500.                when nn == '16' then
  501.                do
  502.                xw  = xg/16
  503.                notex = notex+xw
  504.                end
  505.                when nn == 't' then
  506.                do
  507.                xw  = 0.2
  508.                notex = notex+xw
  509.                end
  510.                otherwise notenwert()
  511.            end
  512.            if notex >=18.7 then
  513.                do
  514.                  notex = (2+(vz*0.175))
  515.                  zz = zz + zdist
  516.                end
  517.            px = notex - 4
  518.            py = zz-1
  519.            if px < 0 then px = 0
  520.            call ppm_SetPagePosition(px, py+1.5)
  521.            notenwert()
  522.           end
  523.  
  524.  
  525.      /* Löschen */
  526.       when nw == 'd' then
  527.           do
  528.            secondbox=firstbox
  529.            oldpos = notex
  530.            thisbox = ppm_BoxNum()
  531.            if thisbox == zbid then
  532.              do
  533.              ppm_Inform(1, "Nichts mehr zu löschen!","OK")
  534.              notenwert()
  535.              end
  536.            lpos= ppm_GetBoxPosition()
  537.            notex = word(lpos, 1)
  538.            call ppm_DeleteBox()
  539.            diff = oldpos - notex
  540.            if (diff < 0.3)&(diff > 0.1) then notex = notex + 0.23
  541.            py = zz - 1
  542.            px = notex - 4
  543.            if px < 0 then px = 0
  544.            call ppm_SetPagePosition(px, py+1.5)
  545.            notenwert()
  546.           end
  547.  
  548.       /* Taktstrich */
  549.       when nw == 't' then
  550.           do
  551.            call ppm_SetLineWeight(0.25)
  552.            call ppm_DrawLine(notex, 2+zz+zdist2, notex, 2.8+zz+zdist2)
  553.            notex = notex+0.2
  554.           end
  555.  
  556.  
  557.       when nw == 'p' | when nw == 'P' then
  558.       do
  559. pausenwert:
  560.         /* wert = ppm_GetForm("1/1 1/2 1/4 1/8 1/16 ...?", 2, "1 , 2, 4, 8, 16") */
  561.         x = notex
  562.         select
  563.             when nn == '1' then do
  564.  
  565.                 y = 2.29+zz+zdist2
  566.                 call ppm_SetLineWeight(4)
  567.                 call ppm_DrawLine(x, y, x+0.4, y)
  568.                 call ppm_SetLineWeight(0.25)
  569.                 xw = xg
  570.                 notex = notex+xw
  571.             end
  572.  
  573.             when nn == '2' then do
  574.  
  575.                 y = 2.33+zz+zdist2
  576.                 call ppm_SetLineWeight(4)
  577.                 call ppm_DrawLine(x, y, x+0.4, y)
  578.                 call ppm_SetLineWeight(0.25)
  579.                 xw = xg/2
  580.                 notex = notex+xw
  581.             end
  582.  
  583.             when nn == '4' then do
  584.  
  585.                 y = 2.07+zz+zdist2
  586.                 Pbox = ppm_CreateBox(x, y, 0.59, 0.86, 0)
  587.                 boxnm = ppm_DocNextBox(Pbox)
  588.                 call ppm_DeleteContents(boxnm)
  589.                 call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/viertelPause', pause)
  590.                 xw = xg/4
  591.                 notex = notex+xw
  592.             end
  593.  
  594.             when nn == '8' then do
  595.  
  596.                 y = 2.21+zz+zdist2
  597.                 Pbox = ppm_CreateBox(x, y, 0.27, 0.42, 0)
  598.                 boxnm = ppm_DocNextBox(Pbox)
  599.                 call ppm_DeleteContents(boxnm)
  600.                 call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/achtelPause', pause)
  601.                 xw = xg/8
  602.                 notex = notex+xw
  603.             end
  604.  
  605.             when nn == '16' then do
  606.  
  607.                 y = 2.21+zz+zdist2
  608.                 Pbox = ppm_CreateBox(x, y, 0.27, 0.42, 0)
  609.                 boxnm = ppm_DocNextBox(Pbox)
  610.                 call ppm_DeleteContents(boxnm)
  611.                 call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/sechzehntelPause', pause)
  612.                 xw = xg/16
  613.                 notex = notex+xw
  614.             end
  615.         otherwise notenwert()
  616.         end
  617.         if notex >=18.7 then
  618.             do
  619.               notex = (2+(vz*0.175))
  620.               zz = zz + zdist
  621.             end
  622.         px = notex - 4
  623.         py = zz-1
  624.         if px < 0 then px = 0
  625.         call ppm_SetPagePosition(px, py+1.5)
  626.         notenwert()
  627.       end
  628.  
  629.     /* Freiräume "space" */
  630.  
  631.       when nw == 'l' then
  632.         do
  633.  
  634.            /* wert = ppm_GetForm("1/1 1/2 1/4 1/8 1/16 ...?", 2, "1 , 2, 4, 8, 16") */
  635.            select
  636.                when nn == '1' then
  637.                do
  638.                xw = xg
  639.                notex = notex+xw
  640.                end
  641.                when nn == '2' then
  642.                do
  643.                xw = xg/2
  644.                notex = notex+xw
  645.                end
  646.                when nn == '4' then
  647.                do
  648.                xw = xg/4
  649.                notex = notex+xw
  650.                end
  651.                when nn == '8' then
  652.                do
  653.                xw = xg/8
  654.                notex = notex+xw
  655.                end
  656.                when nn == '16' then
  657.                do
  658.                xw  = xg/16
  659.                notex = notex+xw
  660.                end
  661.                when nn == 't' then
  662.                do
  663.                xw  = 0.2
  664.                notex = notex+xw
  665.                end
  666.                otherwise notenwert()
  667.            end
  668.            if notex >=18.7 then
  669.                do
  670.                  notex = (2+(vz*0.175))
  671.                  zz = zz + zdist
  672.                end
  673.            px = notex - 4
  674.            py = zz-1
  675.            if px < 0 then px = 0
  676.            call ppm_SetPagePosition(px, py+1.5)
  677.            notenwert()
  678.         end
  679.  
  680.       when nw == 'neu' then
  681.         do
  682.           call ppm_DeleteBox(zbid)
  683.           clickpos()
  684.         end
  685.       otherwise notenwert()
  686.       end
  687.  
  688.         /* y-Raster der Noten - Notenhälse nach oben (y-Position der Box) */
  689.  
  690.        call ppm_SetLineWeight(0.25)
  691.  
  692.       select
  693.         when nn=='g#3'  then
  694.         do
  695.             yw = 0.745 + zdist2
  696.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  697.             call ppm_SetSize(20)
  698.             call ppm_TextIntoBox(box#id, 's')
  699.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  700.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  701.             call ppm_DrawLine(notex, zz+zdist2+1.4, (notex+0.4), zz+zdist2+1.4)
  702.         end
  703.  
  704.         when nn=='g3'  then
  705.         do
  706.             yw = 0.745 + zdist2
  707.             if al == 'a' then call auflhoch()
  708.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  709.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  710.             call ppm_DrawLine(notex, zz+zdist2+1.4, (notex+0.4), zz+zdist2+1.4)
  711.         end
  712.  
  713.         when nn=='gb3' then
  714.         do
  715.             yw = 0.745 + zdist2
  716.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  717.             call ppm_SetSize(20)
  718.             call ppm_TextIntoBox(box#id, 'f')
  719.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  720.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  721.             call ppm_DrawLine(notex, zz+zdist2+1.4, (notex+0.4), zz+zdist2+1.4)
  722.         end
  723.  
  724.         when nn=='f#3'  then
  725.         do
  726.             yw = 0.845 + zdist2
  727.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  728.             call ppm_SetSize(20)
  729.             call ppm_TextIntoBox(box#id, 's')
  730.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  731.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  732.         end
  733.  
  734.         when nn=='f3'  then
  735.         do
  736.             yw = 0.845 + zdist2
  737.             if al == 'a' then call auflhoch()
  738.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  739.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  740.         end
  741.  
  742.         when nn=='e#3'  then
  743.         do
  744.             yw = 0.945 + zdist2
  745.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  746.             call ppm_SetSize(20)
  747.             call ppm_TextIntoBox(box#id, 's')
  748.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  749.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  750.         end
  751.  
  752.         when nn=='e3'  then
  753.         do
  754.             yw = 0.945 + zdist2
  755.             if al == 'a' then call auflhoch()
  756.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  757.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  758.         end
  759.  
  760.         when nn=='eb3' then
  761.         do
  762.             yw = 0.945 + zdist2
  763.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  764.             call ppm_SetSize(20)
  765.             call ppm_TextIntoBox(box#id, 'f')
  766.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  767.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  768.         end
  769.  
  770.         when nn=='d#3'  then
  771.         do
  772.             yw = 1.045 + zdist2
  773.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  774.             call ppm_SetSize(20)
  775.             call ppm_TextIntoBox(box#id, 's')
  776.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  777.         end
  778.  
  779.         when nn=='d3' then
  780.         do
  781.             yw = 1.045 + zdist2
  782.             if al == 'a' then call auflhoch()
  783.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  784.         end
  785.  
  786.         when nn=='db3'    then
  787.         do
  788.             yw = 1.045 + zdist2
  789.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  790.             call ppm_SetSize(20)
  791.             call ppm_TextIntoBox(box#id, 'f')
  792.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  793.         end
  794.  
  795.         when nn=='c#3'    then
  796.         do
  797.             yw = 1.145 + zdist2
  798.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  799.             call ppm_SetSize(20)
  800.             call ppm_TextIntoBox(box#id, 's')
  801.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  802.         end
  803.  
  804.         when nn=='c3'     then
  805.         do
  806.             yw = 1.145 + zdist2
  807.             if al == 'a' then call auflhoch()
  808.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  809.         end
  810.  
  811.         when nn=='h2'     then
  812.         do
  813.             yw = 1.245 + zdist2
  814.             if al == 'a' then call auflhoch()
  815.         end
  816.         when nn=='b2'     then
  817.         do
  818.             yw = 1.245 + zdist2
  819.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  820.             call ppm_SetSize(20)
  821.             call ppm_TextIntoBox(box#id, 'f')
  822.         end
  823.  
  824.         when nn=='a#2'    then
  825.         do
  826.             yw = 1.345 + zdist2
  827.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  828.             call ppm_SetSize(20)
  829.             call ppm_TextIntoBox(box#id, 's')
  830.         end
  831.  
  832.         when nn=='a2'     then
  833.         do
  834.             yw = 1.345 + zdist2
  835.             if al == 'a' then call auflhoch()
  836.         end
  837.         when nn=='ab2'    then
  838.         do
  839.             yw = 1.345 + zdist2
  840.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  841.             call ppm_SetSize(20)
  842.             call ppm_TextIntoBox(box#id, 'f')
  843.         end
  844.  
  845.         when nn=='g#2'    then
  846.         do
  847.             yw = 1.445 + zdist2
  848.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  849.             call ppm_SetSize(20)
  850.             call ppm_TextIntoBox(box#id, 's')
  851.         end
  852.  
  853.         when nn=='g2'     then
  854.         do
  855.             yw = 1.445 + zdist2
  856.             if al == 'a' then call auflhoch()
  857.         end
  858.         when nn=='gb2'    then
  859.         do
  860.             yw = 1.445 + zdist2
  861.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  862.             call ppm_SetSize(20)
  863.             call ppm_TextIntoBox(box#id, 'f')
  864.         end
  865.  
  866.         when nn=='f#2'    then
  867.         do
  868.             yw = 1.545 + zdist2
  869.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  870.             call ppm_SetSize(20)
  871.             call ppm_TextIntoBox(box#id, 's')
  872.         end
  873.  
  874.         when nn=='f2' then
  875.         do
  876.             yw = 1.545 + zdist2
  877.             if al == 'a' then call auflhoch()
  878.         end
  879.         when nn=='e#2'  then
  880.         do
  881.             yw = 1.645 + zdist2
  882.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  883.             call ppm_SetSize(20)
  884.             call ppm_TextIntoBox(box#id, 's')
  885.         end
  886.         when nn=='e2'     then
  887.         do
  888.             yw = 1.645 + zdist2
  889.             if al == 'a' then call auflhoch()
  890.         end
  891.         when nn=='eb2'    then
  892.         do
  893.             yw = 1.645 + zdist2
  894.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  895.             call ppm_SetSize(20)
  896.             call ppm_TextIntoBox(box#id, 'f')
  897.         end
  898.  
  899.         when nn=='d#2'    then
  900.         do
  901.             yw = 1.745 + zdist2
  902.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  903.             call ppm_SetSize(20)
  904.             call ppm_TextIntoBox(box#id, 's')
  905.         end
  906.  
  907.         when nn=='d2'     then
  908.         do
  909.             yw = 1.745 + zdist2
  910.             if al == 'a' then call auflhoch()
  911.         end
  912.         when nn=='db2'    then
  913.         do
  914.             yw = 1.745 + zdist2
  915.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  916.             call ppm_SetSize(20)
  917.             call ppm_TextIntoBox(box#id, 'f')
  918.         end
  919.  
  920.         when nn=='c#2'    then
  921.         do
  922.             yw = 1.845 + zdist2
  923.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  924.             call ppm_SetSize(20)
  925.             call ppm_TextIntoBox(box#id, 's')
  926.         end
  927.  
  928.         when nn=='c2'     then
  929.         do
  930.             yw = 1.845 + zdist2
  931.             if al == 'a' then call auflhoch()
  932.         end
  933.         when nn=='h1'     then
  934.         do
  935.             yw = 1.945 + zdist2
  936.             if al == 'a' then call auflhoch()
  937.         end
  938.         when nn=='b1'     then
  939.         do
  940.             yw = 1.945 + zdist2
  941.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  942.             call ppm_SetSize(20)
  943.             call ppm_TextIntoBox(box#id, 'f')
  944.         end
  945.  
  946.         when nn=='a#1'    then
  947.         do
  948.             yw = 2.045 + zdist2
  949.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  950.             call ppm_SetSize(20)
  951.             call ppm_TextIntoBox(box#id, 's')
  952.         end
  953.  
  954.         when nn=='a1'     then
  955.         do
  956.             yw = 2.045 + zdist2
  957.             if al == 'a' then call auflhoch()
  958.         end
  959.         when nn=='ab1'    then
  960.         do
  961.             yw = 2.045 + zdist2
  962.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  963.             call ppm_SetSize(20)
  964.             call ppm_TextIntoBox(box#id, 'f')
  965.         end
  966.  
  967.         when nn=='g#1'    then
  968.         do
  969.             yw = 2.145 + zdist2
  970.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  971.             call ppm_SetSize(20)
  972.             call ppm_TextIntoBox(box#id, 's')
  973.         end
  974.  
  975.         when nn=='g1'     then
  976.         do
  977.             yw = 2.145 + zdist2
  978.             if al == 'a' then call auflhoch()
  979.         end
  980.         when nn=='gb1'    then
  981.         do
  982.             yw = 2.145 + zdist2
  983.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  984.             call ppm_SetSize(20)
  985.             call ppm_TextIntoBox(box#id, 'f')
  986.         end
  987.  
  988.         when nn=='f#1'    then
  989.         do
  990.             yw = 2.245 + zdist2
  991.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  992.             call ppm_SetSize(20)
  993.             call ppm_TextIntoBox(box#id, 's')
  994.         end
  995.  
  996.         when nn=='f1'     then
  997.         do
  998.             yw = 2.245 + zdist2
  999.             if al == 'a' then call auflhoch()
  1000.         end
  1001.  
  1002.         when nn=='e#1'  then
  1003.         do
  1004.             yw = 2.345 + zdist2
  1005.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  1006.             call ppm_SetSize(20)
  1007.             call ppm_TextIntoBox(box#id, 's')
  1008.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1009.         end
  1010.         when nn=='e1' then
  1011.         do
  1012.             yw = 2.345 + zdist2
  1013.             if al == 'a' then call auflhoch()
  1014.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1015.         end
  1016.  
  1017.         when nn=='eb1'  then
  1018.         do
  1019.             yw = 2.345 + zdist2
  1020.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  1021.             call ppm_SetSize(20)
  1022.             call ppm_TextIntoBox(box#id, 'f')
  1023.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1024.         end
  1025.  
  1026.         when nn=='d#1'  then
  1027.         do
  1028.             yw = 2.445 + zdist2
  1029.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  1030.             call ppm_SetSize(20)
  1031.             call ppm_TextIntoBox(box#id, 's')
  1032.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1033.         end
  1034.  
  1035.         when nn=='d1'  then
  1036.         do
  1037.             yw = 2.445 + zdist2
  1038.             if al == 'a' then call auflhoch()
  1039.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1040.         end
  1041.  
  1042.         when nn=='db1' then
  1043.         do
  1044.             yw = 2.445 + zdist2
  1045.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.21, 0.35, 0.75, 0)
  1046.             call ppm_SetSize(20)
  1047.             call ppm_TextIntoBox(box#id, 'f')
  1048.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1049.         end
  1050.  
  1051.         when nn=='c#1'  then
  1052.         do
  1053.             yw = 2.545 + zdist2
  1054.             box#id = ppm_CreateBox(notex-0.22, yw+zz+0.32, 0.35, 0.75, 0)
  1055.             call ppm_SetSize(20)
  1056.             call ppm_TextIntoBox(box#id, 's')
  1057.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1058.             call ppm_DrawLine(notex, zz+zdist2+3.2, (notex+0.4), zz+zdist2+3.2)
  1059.         end
  1060.  
  1061.         when nn=='c1'  then
  1062.         do
  1063.             yw = 2.545 + zdist2
  1064.             if al == 'a' then call auflhoch()
  1065.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1066.             call ppm_DrawLine(notex, zz+zdist2+3.2, (notex+0.4), zz+zdist2+3.2)
  1067.         end
  1068.  
  1069.     /* y-Raster der Noten - Notenhälse nach unten */
  1070.  
  1071.         when nn=='G#3'  then
  1072.         do
  1073.             yw = 1.22 + zdist2
  1074.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1075.             call ppm_SetSize(20)
  1076.             call ppm_TextIntoBox(box#id, 's')
  1077.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1078.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  1079.             call ppm_DrawLine(notex, zz+zdist2+1.4, (notex+0.4), zz+zdist2+1.4)
  1080.         end
  1081.  
  1082.         when nn=='G3'  then
  1083.         do
  1084.             yw = 1.22 + zdist2
  1085.             if al == 'a' then call aufltief()
  1086.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1087.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  1088.             call ppm_DrawLine(notex, zz+zdist2+1.4, (notex+0.4), zz+zdist2+1.4)
  1089.         end
  1090.  
  1091.         when nn=='Gb3' then
  1092.         do
  1093.             yw = 1.22 + zdist2
  1094.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1095.             call ppm_SetSize(20)
  1096.             call ppm_TextIntoBox(box#id, 'f')
  1097.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1098.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  1099.             call ppm_DrawLine(notex, zz+zdist2+1.4, (notex+0.4), zz+zdist2+1.4)
  1100.         end
  1101.  
  1102.         when nn=='F#3'  then
  1103.         do
  1104.             yw = 1.32 + zdist2
  1105.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1106.             call ppm_SetSize(20)
  1107.             call ppm_TextIntoBox(box#id, 's')
  1108.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1109.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  1110.         end
  1111.  
  1112.         when nn=='F3'  then
  1113.         do
  1114.             yw = 1.32 + zdist2
  1115.             if al == 'a' then call aufltief()
  1116.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1117.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  1118.         end
  1119.  
  1120.         when nn=='E#3'  then
  1121.         do
  1122.             yw = 1.42 + zdist2
  1123.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1124.             call ppm_SetSize(20)
  1125.             call ppm_TextIntoBox(box#id, 's')
  1126.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1127.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  1128.         end
  1129.  
  1130.         when nn=='E3'  then
  1131.         do
  1132.             yw = 1.42 + zdist2
  1133.             if al == 'a' then call aufltief()
  1134.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1135.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  1136.         end
  1137.  
  1138.         when nn=='Eb3' then
  1139.         do
  1140.             yw = 1.42 + zdist2
  1141.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1142.             call ppm_SetSize(20)
  1143.             call ppm_TextIntoBox(box#id, 'f')
  1144.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1145.             call ppm_DrawLine(notex, zz+zdist2+1.6, (notex+0.4), zz+zdist2+1.6)
  1146.         end
  1147.  
  1148.         when nn=='D#3'  then
  1149.         do
  1150.             yw = 1.52 + zdist2
  1151.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1152.             call ppm_SetSize(20)
  1153.             call ppm_TextIntoBox(box#id, 's')
  1154.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1155.         end
  1156.  
  1157.         when nn=='D3' then
  1158.         do
  1159.             yw = 1.52 + zdist2
  1160.             if al == 'a' then call aufltief()
  1161.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1162.         end
  1163.  
  1164.         when nn=='Db3' then
  1165.         do
  1166.             yw = 1.52 + zdist2
  1167.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1168.             call ppm_SetSize(20)
  1169.             call ppm_TextIntoBox(box#id, 'f')
  1170.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1171.         end
  1172.  
  1173.         when nn=='C#3'    then
  1174.         do
  1175.             yw = 1.62 + zdist2
  1176.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1177.             call ppm_SetSize(20)
  1178.             call ppm_TextIntoBox(box#id, 's')
  1179.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1180.         end
  1181.  
  1182.         when nn=='C3'     then
  1183.         do
  1184.             yw = 1.62 + zdist2
  1185.             if al == 'a' then call aufltief()
  1186.             call ppm_DrawLine(notex, zz+zdist2+1.8, (notex+0.4), zz+zdist2+1.8)
  1187.         end
  1188.  
  1189.         when nn=='H2'     then
  1190.         do
  1191.             yw = 1.72 + zdist2
  1192.             if al == 'a' then call aufltief()
  1193.         end
  1194.         when nn=='B2'     then
  1195.         do
  1196.             yw = 1.72 + zdist2
  1197.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1198.             call ppm_SetSize(20)
  1199.             call ppm_TextIntoBox(box#id, 'f')
  1200.         end
  1201.  
  1202.         when nn=='A#2'    then
  1203.         do
  1204.             yw = 1.82 + zdist2
  1205.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1206.             call ppm_SetSize(20)
  1207.             call ppm_TextIntoBox(box#id, 's')
  1208.         end
  1209.  
  1210.         when nn=='A2'     then
  1211.         do
  1212.             yw = 1.82 + zdist2
  1213.             if al == 'a' then call aufltief()
  1214.         end
  1215.         when nn=='Ab2'    then
  1216.         do
  1217.             yw = 1.82 + zdist2
  1218.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1219.             call ppm_SetSize(20)
  1220.             call ppm_TextIntoBox(box#id, 'f')
  1221.         end
  1222.  
  1223.         when nn=='G#2'    then
  1224.         do
  1225.             yw = 1.92 + zdist2
  1226.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1227.             call ppm_SetSize(20)
  1228.             call ppm_TextIntoBox(box#id, 's')
  1229.         end
  1230.  
  1231.         when nn=='G2'     then
  1232.         do
  1233.             yw = 1.92 + zdist2
  1234.             if al == 'a' then call aufltief()
  1235.         end
  1236.         when nn=='Gb2'    then
  1237.         do
  1238.             yw = 1.92 + zdist2
  1239.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1240.             call ppm_SetSize(20)
  1241.             call ppm_TextIntoBox(box#id, 'f')
  1242.         end
  1243.  
  1244.         when nn=='F#2'    then
  1245.         do
  1246.             yw = 2.02 + zdist2
  1247.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1248.             call ppm_SetSize(20)
  1249.             call ppm_TextIntoBox(box#id, 's')
  1250.         end
  1251.  
  1252.         when nn=='F2'     then
  1253.         do
  1254.             yw = 2.02 + zdist2
  1255.             if al == 'a' then call aufltief()
  1256.         end
  1257.         when nn=='E#2'    then
  1258.         do
  1259.             yw = 2.12 + zdist2
  1260.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1261.             call ppm_SetSize(20)
  1262.             call ppm_TextIntoBox(box#id, 's')
  1263.         end
  1264.  
  1265.         when nn=='E2'     then
  1266.         do
  1267.             yw = 2.12 + zdist2
  1268.             if al == 'a' then call aufltief()
  1269.         end
  1270.         when nn=='Eb2'    then
  1271.         do
  1272.             yw = 2.12 + zdist2
  1273.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1274.             call ppm_SetSize(20)
  1275.             call ppm_TextIntoBox(box#id, 'f')
  1276.         end
  1277.  
  1278.         when nn=='D#2'    then
  1279.         do
  1280.             yw = 2.22 + zdist2
  1281.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1282.             call ppm_SetSize(20)
  1283.             call ppm_TextIntoBox(box#id, 's')
  1284.         end
  1285.  
  1286.         when nn=='D2'     then
  1287.         do
  1288.             yw = 2.22 + zdist2
  1289.             if al == 'a' then call aufltief()
  1290.         end
  1291.         when nn=='Db2'    then
  1292.         do
  1293.             yw = 2.22 + zdist2
  1294.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1295.             call ppm_SetSize(20)
  1296.             call ppm_TextIntoBox(box#id, 'f')
  1297.         end
  1298.  
  1299.         when nn=='C#2'    then
  1300.         do
  1301.             yw = 2.32 + zdist2
  1302.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1303.             call ppm_SetSize(20)
  1304.             call ppm_TextIntoBox(box#id, 's')
  1305.         end
  1306.  
  1307.         when nn=='C2'     then
  1308.         do
  1309.             yw = 2.32 + zdist2
  1310.             if al == 'a' then call aufltief()
  1311.         end
  1312.         when nn=='H1'     then yw = 2.42 + zdist2
  1313.         when nn=='B1'     then
  1314.         do
  1315.             yw = 2.42 + zdist2
  1316.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1317.             call ppm_SetSize(20)
  1318.             call ppm_TextIntoBox(box#id, 'f')
  1319.         end
  1320.  
  1321.         when nn=='A#1'    then
  1322.         do
  1323.             yw = 2.52 + zdist2
  1324.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1325.             call ppm_SetSize(20)
  1326.             call ppm_TextIntoBox(box#id, 's')
  1327.         end
  1328.  
  1329.         when nn=='A1'     then
  1330.         do
  1331.             yw = 2.52 + zdist2
  1332.             if al == 'a' then call aufltief()
  1333.         end
  1334.         when nn=='Ab1'    then
  1335.         do
  1336.             yw = 2.52 + zdist2
  1337.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1338.             call ppm_SetSize(20)
  1339.             call ppm_TextIntoBox(box#id, 'f')
  1340.         end
  1341.  
  1342.         when nn=='G#1'    then
  1343.         do
  1344.             yw = 2.62 + zdist2
  1345.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1346.             call ppm_SetSize(20)
  1347.             call ppm_TextIntoBox(box#id, 's')
  1348.         end
  1349.  
  1350.         when nn=='G1'     then
  1351.         do
  1352.             yw = 2.62 + zdist2
  1353.             if al == 'a' then call aufltief()
  1354.         end
  1355.         when nn=='Gb1'    then
  1356.         do
  1357.             yw = 2.62 + zdist2
  1358.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1359.             call ppm_SetSize(20)
  1360.             call ppm_TextIntoBox(box#id, 'f')
  1361.         end
  1362.  
  1363.         when nn=='F#1'    then
  1364.         do
  1365.             yw = 2.72 + zdist2
  1366.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1367.             call ppm_SetSize(20)
  1368.             call ppm_TextIntoBox(box#id, 's')
  1369.         end
  1370.  
  1371.         when nn=='F1'     then
  1372.         do
  1373.             yw = 2.72 + zdist2
  1374.             if al == 'a' then call aufltief()
  1375.         end
  1376.  
  1377.         when nn=='E#1'    then
  1378.         do
  1379.             yw = 2.82 + zdist2
  1380.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1381.             call ppm_SetSize(20)
  1382.             call ppm_TextIntoBox(box#id, 's')
  1383.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1384.         end
  1385.  
  1386.         when nn=='E1' then
  1387.         do
  1388.             yw = 2.82 + zdist2
  1389.             if al == 'a' then call aufltief()
  1390.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1391.         end
  1392.  
  1393.         when nn=='Eb1'  then
  1394.         do
  1395.             yw = 2.82 + zdist2
  1396.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1397.             call ppm_SetSize(20)
  1398.             call ppm_TextIntoBox(box#id, 'f')
  1399.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1400.         end
  1401.  
  1402.         when nn=='D#1'  then
  1403.         do
  1404.             yw = 2.92 + zdist2
  1405.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1406.             call ppm_SetSize(20)
  1407.             call ppm_TextIntoBox(box#id, 's')
  1408.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1409.         end
  1410.  
  1411.         when nn=='D1'  then
  1412.         do
  1413.             yw = 2.92 + zdist2
  1414.             if al == 'a' then call aufltief()
  1415.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1416.         end
  1417.  
  1418.         when nn=='Db1' then
  1419.         do
  1420.             yw = 2.92 + zdist2
  1421.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.27, 0.35, 0.75, 0)
  1422.             call ppm_SetSize(20)
  1423.             call ppm_TextIntoBox(box#id, 'f')
  1424.             call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1425.         end
  1426.  
  1427.         when nn=='C#1'  then
  1428.         do
  1429.           yw = 3.02 + zdist2
  1430.             box#id = ppm_CreateBox(notex-0.24, yw+zz-0.15, 0.35, 0.75, 0)
  1431.             call ppm_SetSize(20)
  1432.             call ppm_TextIntoBox(box#id, 's')
  1433.           call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1434.           call ppm_DrawLine(notex, zz+zdist2+3.2, (notex+0.4), zz+zdist2+3.2)
  1435.         end
  1436.  
  1437.         when nn=='C1'  then
  1438.         do
  1439.           yw = 3.02 + zdist2
  1440.             if al == 'a' then call aufltief()
  1441.           call ppm_DrawLine(notex, zz+zdist2+3, (notex+0.4), zz+zdist2+3)
  1442.           call ppm_DrawLine(notex, zz+zdist2+3.2, (notex+0.4), zz+zdist2+3.2)
  1443.         end
  1444.         otherwise notenwert()
  1445.       end
  1446.  
  1447.         /* größe einer Notenbox */
  1448.  
  1449.         notewidht = 0.64
  1450.         noteheight = 0.97
  1451.  
  1452.         firstbox = secondbox
  1453.         boxid = ppm_CreateBox(notex, yw+zz, notewidht, noteheight, 0)
  1454.         call ppm_SetSize(notepkt)
  1455.         call ppm_TextIntoBox(boxid, nw)
  1456.         bakx = notex
  1457.         notex = (notex + xw)
  1458.         if notex >=18.7 then
  1459.             do
  1460.               notex = (2+(vz*0.175))
  1461.               zz = zz + zdist
  1462.             end
  1463.         px = notex - 4
  1464.         py = zz-1
  1465.         if px < 0 then px = 0
  1466.         call ppm_SetPagePosition(px, py+1.5)
  1467.         secondbox=boxid
  1468.       end
  1469.    end
  1470.  end
  1471. exit
  1472.  
  1473. auflhoch:
  1474. do
  1475.   Pbox = ppm_CreateBox(notex-0.34, yw+zz+0.07, 0.6, 1.2, 0)
  1476.   boxnm = ppm_DocNextBox(Pbox)
  1477.   call ppm_DeleteContents(boxnm)
  1478.   call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/Auflsng', Zeichen)
  1479.   return
  1480. end
  1481.  
  1482. aufltief:
  1483. do
  1484.   Pbox = ppm_CreateBox(notex-0.34, yw+zz-0.4, 0.6, 1.2, 0)
  1485.   boxnm = ppm_DocNextBox(Pbox)
  1486.   call ppm_DeleteContents(boxnm)
  1487.   call ppm_ImportGraphic(boxnm, 'Genies:noten_pausen/Auflsng', Zeichen)
  1488.   return
  1489. end
  1490.  
  1491. break_d:
  1492. break_e:
  1493. break_c:
  1494. halt:
  1495.     call exit_msg("User aborted Genie!")
  1496.  
  1497. exit_msg: procedure
  1498. do
  1499.     parse arg message
  1500.  
  1501.     if message ~= '' then
  1502.     call ppm_Inform(1,message,)
  1503.  
  1504.     call ppm_ClearStatus()
  1505.     call ppm_AutoUpdate(1)
  1506.     exit
  1507. end
  1508.